package com.example.tool.adapter;

import android.content.Context;
import android.view.View;

import com.example.tool.R;
import com.example.tool.adapter.base.CommonAdapter;
import com.example.tool.adapter.base.CommonViewHolder;

import java.util.List;

/**
 * Created Date 2019/9/4
 *
 * @author liangkun
 * description：弹窗样式的样式
 */
public class PopAdapter extends CommonAdapter<String> {

    public PopAdapter(Context context, List<String> datas, int layoutId) {
        super(context, datas, layoutId);
    }

    @Override
    protected void onBindData(final CommonViewHolder holder, String bean, final int position) {
        holder.setText(R.id.tv_pop, bean);
        holder.getView(R.id.card_home_item).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (mOnItemClickListener != null) {
                    mOnItemClickListener.onItemClick(v, holder, position);
                }
            }
        });
    }
}
